<script>
export default {
  name: "MyCar"
}
</script>

<template>
<div>
  <h3 v-if="$store.state.car.carList.length===0">空空如也...</h3>
  <template v-else>
    <div v-for="item in $store.state.car.carList">
      <p>商品名称{{item.goodsName}}</p>
      <p>商品价格{{item.goodsPrice}}</p>
      <p>商品数量{{item.buyNum}}</p>
    </div>
    <h3>总价格{{$store.getters.sumPrice | currency}}</h3>
  </template>
</div>
</template>

<style scoped>

</style>